﻿using System;

namespace HslCommunication.Profinet.Melsec
{
	/// <summary>
	/// 三菱R系列的PLC的数据类型
	/// </summary>
	// Token: 0x02000070 RID: 112
	public class MelsecMcRDataType
	{
		/// <summary>
		/// 如果您清楚类型代号，可以根据值进行扩展
		/// </summary>
		/// <param name="code">数据类型的代号</param>
		/// <param name="type">0或1，默认为0</param>
		/// <param name="asciiCode">ASCII格式的类型信息</param>
		/// <param name="fromBase">指示地址的多少进制的，10或是16</param>
		// Token: 0x06000929 RID: 2345 RVA: 0x00034828 File Offset: 0x00032A28
		public MelsecMcRDataType(byte[] code, byte type, string asciiCode, int fromBase)
		{
			this.DataCode = code;
			this.AsciiCode = asciiCode;
			this.FromBase = fromBase;
			bool flag = type < 2;
			if (flag)
			{
				this.DataType = type;
			}
		}

		/// <summary>
		/// 类型的代号值
		/// </summary>
		// Token: 0x1700018F RID: 399
		// (get) Token: 0x0600092A RID: 2346 RVA: 0x00034879 File Offset: 0x00032A79
		// (set) Token: 0x0600092B RID: 2347 RVA: 0x00034881 File Offset: 0x00032A81
		public byte[] DataCode { get; private set; } = new byte[2];

		/// <summary>
		/// 数据的类型，0代表按字，1代表按位
		/// </summary>
		// Token: 0x17000190 RID: 400
		// (get) Token: 0x0600092C RID: 2348 RVA: 0x0003488A File Offset: 0x00032A8A
		// (set) Token: 0x0600092D RID: 2349 RVA: 0x00034892 File Offset: 0x00032A92
		public byte DataType { get; private set; } = 0;

		/// <summary>
		/// 当以ASCII格式通讯时的类型描述
		/// </summary>
		// Token: 0x17000191 RID: 401
		// (get) Token: 0x0600092E RID: 2350 RVA: 0x0003489B File Offset: 0x00032A9B
		// (set) Token: 0x0600092F RID: 2351 RVA: 0x000348A3 File Offset: 0x00032AA3
		public string AsciiCode { get; private set; }

		/// <summary>
		/// 指示地址是10进制，还是16进制的
		/// </summary>
		// Token: 0x17000192 RID: 402
		// (get) Token: 0x06000930 RID: 2352 RVA: 0x000348AC File Offset: 0x00032AAC
		// (set) Token: 0x06000931 RID: 2353 RVA: 0x000348B4 File Offset: 0x00032AB4
		public int FromBase { get; private set; }

		// Token: 0x06000932 RID: 2354 RVA: 0x000348C0 File Offset: 0x00032AC0
		// Note: this type is marked as 'beforefieldinit'.
		static MelsecMcRDataType()
		{
			byte[] array = new byte[2];
			array[0] = 156;
			MelsecMcRDataType.X = new MelsecMcRDataType(array, 1, "X***", 16);
			byte[] array2 = new byte[2];
			array2[0] = 157;
			MelsecMcRDataType.Y = new MelsecMcRDataType(array2, 1, "Y***", 16);
			byte[] array3 = new byte[2];
			array3[0] = 144;
			MelsecMcRDataType.M = new MelsecMcRDataType(array3, 1, "M***", 10);
			byte[] array4 = new byte[2];
			array4[0] = 145;
			MelsecMcRDataType.SM = new MelsecMcRDataType(array4, 1, "SM**", 10);
			byte[] array5 = new byte[2];
			array5[0] = 146;
			MelsecMcRDataType.L = new MelsecMcRDataType(array5, 1, "L***", 10);
			byte[] array6 = new byte[2];
			array6[0] = 147;
			MelsecMcRDataType.F = new MelsecMcRDataType(array6, 1, "F***", 10);
			byte[] array7 = new byte[2];
			array7[0] = 148;
			MelsecMcRDataType.V = new MelsecMcRDataType(array7, 1, "V***", 10);
			byte[] array8 = new byte[2];
			array8[0] = 152;
			MelsecMcRDataType.S = new MelsecMcRDataType(array8, 1, "S***", 10);
			byte[] array9 = new byte[2];
			array9[0] = 160;
			MelsecMcRDataType.B = new MelsecMcRDataType(array9, 1, "B***", 16);
			byte[] array10 = new byte[2];
			array10[0] = 161;
			MelsecMcRDataType.SB = new MelsecMcRDataType(array10, 1, "SB**", 16);
			byte[] array11 = new byte[2];
			array11[0] = 162;
			MelsecMcRDataType.DX = new MelsecMcRDataType(array11, 1, "DX**", 16);
			byte[] array12 = new byte[2];
			array12[0] = 163;
			MelsecMcRDataType.DY = new MelsecMcRDataType(array12, 1, "DY**", 16);
			byte[] array13 = new byte[2];
			array13[0] = 168;
			MelsecMcRDataType.D = new MelsecMcRDataType(array13, 0, "D***", 10);
			byte[] array14 = new byte[2];
			array14[0] = 169;
			MelsecMcRDataType.SD = new MelsecMcRDataType(array14, 0, "SD**", 10);
			byte[] array15 = new byte[2];
			array15[0] = 180;
			MelsecMcRDataType.W = new MelsecMcRDataType(array15, 0, "W***", 16);
			byte[] array16 = new byte[2];
			array16[0] = 181;
			MelsecMcRDataType.SW = new MelsecMcRDataType(array16, 0, "SW**", 16);
			byte[] array17 = new byte[2];
			array17[0] = 175;
			MelsecMcRDataType.R = new MelsecMcRDataType(array17, 0, "R***", 10);
			byte[] array18 = new byte[2];
			array18[0] = 204;
			MelsecMcRDataType.Z = new MelsecMcRDataType(array18, 0, "Z***", 10);
			byte[] array19 = new byte[2];
			array19[0] = 89;
			MelsecMcRDataType.LSTS = new MelsecMcRDataType(array19, 1, "LSTS", 10);
			byte[] array20 = new byte[2];
			array20[0] = 88;
			MelsecMcRDataType.LSTC = new MelsecMcRDataType(array20, 1, "LSTC", 10);
			byte[] array21 = new byte[2];
			array21[0] = 90;
			MelsecMcRDataType.LSTN = new MelsecMcRDataType(array21, 0, "LSTN", 10);
			byte[] array22 = new byte[2];
			array22[0] = 199;
			MelsecMcRDataType.STS = new MelsecMcRDataType(array22, 1, "STS*", 10);
			byte[] array23 = new byte[2];
			array23[0] = 198;
			MelsecMcRDataType.STC = new MelsecMcRDataType(array23, 1, "STC*", 10);
			byte[] array24 = new byte[2];
			array24[0] = 200;
			MelsecMcRDataType.STN = new MelsecMcRDataType(array24, 0, "STN*", 10);
			byte[] array25 = new byte[2];
			array25[0] = 81;
			MelsecMcRDataType.LTS = new MelsecMcRDataType(array25, 1, "LTS*", 10);
			byte[] array26 = new byte[2];
			array26[0] = 80;
			MelsecMcRDataType.LTC = new MelsecMcRDataType(array26, 1, "LTC*", 10);
			byte[] array27 = new byte[2];
			array27[0] = 82;
			MelsecMcRDataType.LTN = new MelsecMcRDataType(array27, 0, "LTN*", 10);
			byte[] array28 = new byte[2];
			array28[0] = 193;
			MelsecMcRDataType.TS = new MelsecMcRDataType(array28, 1, "TS**", 10);
			byte[] array29 = new byte[2];
			array29[0] = 192;
			MelsecMcRDataType.TC = new MelsecMcRDataType(array29, 1, "TC**", 10);
			byte[] array30 = new byte[2];
			array30[0] = 194;
			MelsecMcRDataType.TN = new MelsecMcRDataType(array30, 0, "TN**", 10);
			byte[] array31 = new byte[2];
			array31[0] = 85;
			MelsecMcRDataType.LCS = new MelsecMcRDataType(array31, 1, "LCS*", 10);
			byte[] array32 = new byte[2];
			array32[0] = 84;
			MelsecMcRDataType.LCC = new MelsecMcRDataType(array32, 1, "LCC*", 10);
			byte[] array33 = new byte[2];
			array33[0] = 86;
			MelsecMcRDataType.LCN = new MelsecMcRDataType(array33, 0, "LCN*", 10);
			byte[] array34 = new byte[2];
			array34[0] = 196;
			MelsecMcRDataType.CS = new MelsecMcRDataType(array34, 1, "CS**", 10);
			byte[] array35 = new byte[2];
			array35[0] = 195;
			MelsecMcRDataType.CC = new MelsecMcRDataType(array35, 1, "CC**", 10);
			byte[] array36 = new byte[2];
			array36[0] = 197;
			MelsecMcRDataType.CN = new MelsecMcRDataType(array36, 0, "CN**", 10);
		}

		/// <summary>
		/// X输入继电器
		/// </summary>
		// Token: 0x0400026B RID: 619
		public static readonly MelsecMcRDataType X;

		/// <summary>
		/// Y输入继电器
		/// </summary>
		// Token: 0x0400026C RID: 620
		public static readonly MelsecMcRDataType Y;

		/// <summary>
		/// M内部继电器
		/// </summary>
		// Token: 0x0400026D RID: 621
		public static readonly MelsecMcRDataType M;

		/// <summary>
		/// 特殊继电器
		/// </summary>
		// Token: 0x0400026E RID: 622
		public static readonly MelsecMcRDataType SM;

		/// <summary>
		/// 锁存继电器
		/// </summary>
		// Token: 0x0400026F RID: 623
		public static readonly MelsecMcRDataType L;

		/// <summary>
		/// 报警器
		/// </summary>
		// Token: 0x04000270 RID: 624
		public static readonly MelsecMcRDataType F;

		/// <summary>
		/// 变址继电器
		/// </summary>
		// Token: 0x04000271 RID: 625
		public static readonly MelsecMcRDataType V;

		/// <summary>
		/// S步进继电器
		/// </summary>
		// Token: 0x04000272 RID: 626
		public static readonly MelsecMcRDataType S;

		/// <summary>
		/// 链接继电器
		/// </summary>
		// Token: 0x04000273 RID: 627
		public static readonly MelsecMcRDataType B;

		/// <summary>
		/// 特殊链接继电器
		/// </summary>
		// Token: 0x04000274 RID: 628
		public static readonly MelsecMcRDataType SB;

		/// <summary>
		/// 直接访问输入继电器
		/// </summary>
		// Token: 0x04000275 RID: 629
		public static readonly MelsecMcRDataType DX;

		/// <summary>
		/// 直接访问输出继电器
		/// </summary>
		// Token: 0x04000276 RID: 630
		public static readonly MelsecMcRDataType DY;

		/// <summary>
		/// 数据寄存器
		/// </summary>
		// Token: 0x04000277 RID: 631
		public static readonly MelsecMcRDataType D;

		/// <summary>
		/// 特殊数据寄存器
		/// </summary>
		// Token: 0x04000278 RID: 632
		public static readonly MelsecMcRDataType SD;

		/// <summary>
		/// 链接寄存器
		/// </summary>
		// Token: 0x04000279 RID: 633
		public static readonly MelsecMcRDataType W;

		/// <summary>
		/// 特殊链接寄存器
		/// </summary>
		// Token: 0x0400027A RID: 634
		public static readonly MelsecMcRDataType SW;

		/// <summary>
		/// 文件寄存器
		/// </summary>
		// Token: 0x0400027B RID: 635
		public static readonly MelsecMcRDataType R;

		/// <summary>
		/// 变址寄存器
		/// </summary>
		// Token: 0x0400027C RID: 636
		public static readonly MelsecMcRDataType Z;

		/// <summary>
		/// 长累计定时器触点
		/// </summary>
		// Token: 0x0400027D RID: 637
		public static readonly MelsecMcRDataType LSTS;

		/// <summary>
		/// 长累计定时器线圈
		/// </summary>
		// Token: 0x0400027E RID: 638
		public static readonly MelsecMcRDataType LSTC;

		/// <summary>
		/// 长累计定时器当前值
		/// </summary>
		// Token: 0x0400027F RID: 639
		public static readonly MelsecMcRDataType LSTN;

		/// <summary>
		/// 累计定时器触点
		/// </summary>
		// Token: 0x04000280 RID: 640
		public static readonly MelsecMcRDataType STS;

		/// <summary>
		/// 累计定时器线圈
		/// </summary>
		// Token: 0x04000281 RID: 641
		public static readonly MelsecMcRDataType STC;

		/// <summary>
		/// 累计定时器当前值
		/// </summary>
		// Token: 0x04000282 RID: 642
		public static readonly MelsecMcRDataType STN;

		/// <summary>
		/// 长定时器触点
		/// </summary>
		// Token: 0x04000283 RID: 643
		public static readonly MelsecMcRDataType LTS;

		/// <summary>
		/// 长定时器线圈
		/// </summary>
		// Token: 0x04000284 RID: 644
		public static readonly MelsecMcRDataType LTC;

		/// <summary>
		/// 长定时器当前值
		/// </summary>
		// Token: 0x04000285 RID: 645
		public static readonly MelsecMcRDataType LTN;

		/// <summary>
		/// 定时器触点
		/// </summary>
		// Token: 0x04000286 RID: 646
		public static readonly MelsecMcRDataType TS;

		/// <summary>
		/// 定时器线圈
		/// </summary>
		// Token: 0x04000287 RID: 647
		public static readonly MelsecMcRDataType TC;

		/// <summary>
		/// 定时器当前值
		/// </summary>
		// Token: 0x04000288 RID: 648
		public static readonly MelsecMcRDataType TN;

		/// <summary>
		/// 长计数器触点
		/// </summary>
		// Token: 0x04000289 RID: 649
		public static readonly MelsecMcRDataType LCS;

		/// <summary>
		/// 长计数器线圈
		/// </summary>
		// Token: 0x0400028A RID: 650
		public static readonly MelsecMcRDataType LCC;

		/// <summary>
		/// 长计数器当前值
		/// </summary>
		// Token: 0x0400028B RID: 651
		public static readonly MelsecMcRDataType LCN;

		/// <summary>
		/// 计数器触点
		/// </summary>
		// Token: 0x0400028C RID: 652
		public static readonly MelsecMcRDataType CS;

		/// <summary>
		/// 计数器线圈
		/// </summary>
		// Token: 0x0400028D RID: 653
		public static readonly MelsecMcRDataType CC;

		/// <summary>
		/// 计数器当前值
		/// </summary>
		// Token: 0x0400028E RID: 654
		public static readonly MelsecMcRDataType CN;
	}
}
